import { type RemoveMethods } from "@/types/remove-methods";

export class Setting {
  dataPath: string;
  git: string;
  account: string;
  push2RemoteMin: number;

  setInfo(data: RemoveMethods<Setting>) {
    Object.assign(this, data);
  }

  constructor(dataPath: string, git: string, account: string, push2RemoteMin: number) {
    this.dataPath = dataPath;
    this.git = git;
    this.account = account;
    this.push2RemoteMin = push2RemoteMin;
  }
  static checkIsValid(setting: Setting) {
    if (setting.dataPath.length <= 0) return false;
    return true;
  }
}
